# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.contrib import admin
from wjapp.models import *


class WjInfoAdmin(admin.ModelAdmin):
    list_display = ['id', 'open_id', 'nickname', 'title', 'enabled']

    search_fields = ['id', 'open_id', 'nickname', 'title', 'bref', 'question_json', 'like_wj_json', 'part_wj_json']

    list_filter = ('open_id', 'enabled')

    ordering = ('-id',)
    list_per_page = 100


class WjUserAdmin(admin.ModelAdmin):
    list_display = ['id', 'open_id', 'nickname']

    search_fields = ['id', 'open_id', 'nickname']

    list_filter = ('open_id',)

    ordering = ('-id',)
    list_per_page = 100


class WjBlockAdmin(admin.ModelAdmin):
    list_display = ['id', 'open_id']

    search_fields = ['id', 'open_id']

    ordering = ('-id',)
    list_per_page = 100


admin.site.register(WjInfo, WjInfoAdmin)
admin.site.register(WjUser, WjUserAdmin)
admin.site.register(WjBlock, WjBlockAdmin)
